<?php

class Application_Form_LanguageInfo extends Zend_Form
{

    public function init()
    {
        $this->setName('languageinfo');
        $this->setMethod('POST');
        
        $lName = new Zend_Form_Element_Text('lname');
        $lName->setLabel('语言名称')
                ->setRequired(true)
                ->setAttrib('class','border')
                ->setAttrib('MaxLength', '10')
                ->addValidator('NotEmpty');
        
        $lCompilerName = new Zend_Form_Element_Text('lcompiler_name');
        $lCompilerName->setLabel('编译器名称')
                      ->setRequired(true)
                      ->setAttrib('MaxLength', '16')
                      ->setAttrib('class','border')
                      ->addValidator('NotEmpty');
        
        $lCompilerPath = new Zend_Form_Element_Text('lcompiler_path');
        $lCompilerPath->setLabel('编译器路径')
                      ->setRequired(true)
                      ->setAttrib('MaxLength', '16')
                      ->setAttrib('class','border')
                      ->addValidator('NotEmpty');
        
        $lCompilerArgs = new Zend_Form_Element_Text('lcompiler_args');
        $lCompilerArgs->setLabel('编译器参数')
                      ->setAttrib('MaxLength', '64')
                      ->setAttrib('class','border')
                      ->setAttrib('size',64)
                      ->addValidator('NotEmpty');
        
        $lSubmit = new Zend_Form_Element_Submit('naddsubmit');
        $lSubmit->setLabel('提交更改')
                ->setAttrib('id','lsubmit')
                ->setAttrib('class','border')
                ->setAttrib('class','submit');
        
        $this->addElements(array($lName,$lCompilerName,$lCompilerPath,$lCompilerArgs,$lSubmit));
    }


}

